Class Flow.InventoryItem

Represents the properties of an object as it appears in the inventory.

Functions

InventoryItem(nameKey, slot, yOffset, scale, rot, axis, meshBits, action) Create an InventoryItem.


Functions

InventoryItem(nameKey, slot, yOffset, scale, rot, axis, meshBits, action)
Create an InventoryItem.

Parameters:

  • nameKey string key for the item's (localised) name.
    Corresponds to an entry in strings.lua.
  • slot ObjID slot of inventory object to change
  • yOffset int y-axis offset (positive values move the item down).
    A value of about 100 will cause the item to display directly below its usual position.
  • scale float item size (1 being standard size).
    A value of 0.5 will cause the item to render at half the size, and a value of 2 will cause the item to render at twice the size.
  • rot Rotation rotation about x, y, and z axes
  • axis RotationAxis Axis to rotate about when the item is being looked at in the inventory.
    Note that this is entirely separate from the rot field described above. Must one of the following:

    X
    Y
    Z
    

    e.g. myItem.rotAxisWhenCurrent = RotationAxis.X

  • meshBits int Not currently implemented (will have no effect regardless of what you set it to)
  • action ItemAction is this usable, equippable, combineable or examinable?
    Must be one of:

    EQUIP
    USE
    COMBINE
    EXAMINE
    

    e.g. myItem.action = ItemAction.EXAMINE

Returns:

    InventoryItem an InventoryItem
generated by TEN-LDoc (a fork of LDoc 1.4.6) Last updated 2023-06-03 11:42:57